const mongoose = require("mongoose");
//  评论表    comment
module.exports = mongoose.model("comment", {
  // plcontent      评论内容
  plcontent: {
    type: String,
  
  },
  // pllike    评论点赞数 
  pllike: {
    type: String,
  
  },
  // pltime    评论时间
  pltime: {
    type: String,
  
  },

  user_id  : {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'user',
  },
  // recipe_id   菜谱id
  recipe_id  : {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'recipe',
  },
  // works_id  作品id 
  works_id  : {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'works',
  },


});